<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="/css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">应用收入确认</div>
    <div class="main_soso">
    <form action="/finance/searchAppDateReport.shtml">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		    <td width="19" height="30" align="center"><img src="../images/clean_011.gif" width="16" height="16" /></td>
		    <td>
		       开始时间:
		      <input name="beginDate" value="<fmt:formatDate value="${beginDate}" pattern="yyyy-MM-dd"/>" type="text" class="date_type" id="textfield" readonly="readonly"  onclick="new Calendar().show(this);"/>
		       结束时间: 
		      <input name="endDate" value="<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>" type="text" class="date_type" id="textfield" readonly="readonly"  onclick="new Calendar().show(this);"/>
		       状态: <select name="state"> 
		           <option value="">请选择...</option>
		           <option value="no_pay" <c:if test="${state=='no_pay'}">selected="selected"</c:if>>未确认</option>
		           <option value="pay" <c:if test="${state=='pay'}">selected="selected"</c:if>>已确认</option>
		       </select>  
		      </td>
		    <td align="left">
		      <input name="input7" type="submit" class="input01" value="搜索" /></td>
		  </tr>
		</table>
    </form>
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="5%"> <input name="all" type="checkbox"  value="" onclick="util.checkAll(this,'ids');"/> </th>
          <th width="10%">应用</th>
          <th width="10%">日期</th>
          <th width="6%">请求数</th>
          <th width="6%">展示数</th>
          <th width="6%">点击数 </th>
          <th width="10%">效果数(CPA) </th>
          <th width="6%">预计收入</th>
          <th width="6%">确认收入</th>
          <th width="6%">状态</th>
          <th>&nbsp;</th>
        </tr>
      </table>
    </div>
  </div>
  
  <form action="/finance/comfirmAppDateReport.shtml" name="appDateReport">
  <div class="content_main">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="background_hegh01">
      <c:forEach items="${page_list.list}" var="o">
            <tr>
               <td width="5%"><input name="ids" type="checkbox"  value="${o.id}" /></td>
               <td width="10%">${o.appName}</td>
               <td width="10%"><fmt:formatDate value="${o.createTime}" pattern="yyyy-MM-dd"/> </td>
               <td width="6%">${o.requestCount}</td>
               <td width="6%">${o.showCount}</td>
               <td width="6%">${o.clickCount}</td>
               <td width="10%">${o.actionCount}</td>
               <td width="6%"><fmt:formatNumber pattern="#0.00" value="${o.payMoney}"></fmt:formatNumber> </td>
               <td width="6%"><fmt:formatNumber pattern="#0.00" value="${o.factMoney}"></fmt:formatNumber> </td>
               <td width="6%">
                  <c:choose>
                     <c:when test="${o.state=='no_pay'}"><span style="color:#ff6666;">未确认</span></c:when>
                     <c:when test="${o.state=='pay'}"><span style="color:blue;">已确认</span></c:when>
                     
                  </c:choose>
               </td>
               <td>
               
               </td>
            </tr>
      </c:forEach>
    </table>
  </div>
  <app:page></app:page>
  </form>
</div>
<div> <input name="input7" type="submit" class="input01" onclick="_submit(this);" value="确认收入" />&nbsp;</div>
</body>
</html>

<script  src="/scripts/util.js" type="text/javascript"></script>
<script type="text/javascript" src="/scripts/calendar.js"></script>
<script type="text/javascript">
  function _submit(th){
     if(util.isCheck('ids')){
        if(confirm("确认操作?")){
            document.appDateReport.submit();
        }
     }else{
        alert("请选择操作的数据");
     }
  }
</script>